package cn.net.msg.cxf.webservice.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

import cn.net.msg.cxf.webservice.IFocusWebService;
import cn.net.msg.model.PageView;
import cn.net.msg.model.TbFocus;
import cn.net.msg.service.TbFocusService;
import cn.net.msg.service.base.Order;

/**
 * <p>
 * FileName: FocusWebServiceImpl.java
 * </p>
 * <p>
 * Description: Focus的cxf服务实现类
 * <p>
 * Copyright: surepassserver(c) 2012
 * </p>
 * <p>
 * @author Vic Su
 * </p>
 * <p>
 * @content andyliu900@gmail.com
 * </p>
 * <p>
 * @version 1.0
 * </p>
 * <p>
 * CreatDate: 2013-1-31 下午11:54:16
 * </p>
 * <p>
 * Modification History
 */

@WebService
@SOAPBinding(style = Style.RPC)
@SuppressWarnings("deprecation")
public class FocusWebServiceImpl implements IFocusWebService {

    private static final long serialVersionUID = -7574227471454773256L;

    @Resource(name="tbFocusService")
    TbFocusService service;

    @Override
    public List<TbFocus> getTop5Focus() {
        // TODO Auto-generated method stub
        List<TbFocus> list = new ArrayList<TbFocus>();

        PageView<TbFocus> pageView = new PageView<TbFocus>(5, 1);
        list = service.getTop5Focus(pageView.getFirstResult(), pageView.getMaxresult(), Order.DESC, "focusInputtime");
        return list;        
    }
}
